package FIleInpuSteam;

import java.io.PrintStream;

public class Printtest1  {
    public static void main(String[] args) {
        //可以将字符串直接打印到指定位置，没有文件名字的可以直接创造
        try (  PrintStream ps = new PrintStream("D:\\wc66.txt");){
            ps.println("吴奥宇你还好吗");
            ps.println("吴奥宇你还好吗");
            ps.println("吴奥宇你还好吗");
            ps.println("吴奥宇你还好吗");
            ps.println("吴奥宇你还好吗");
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
